/*** Eclipse Class Decompiler plugin, copyright (c) 2012 Chao Chen (cnfree2000@hotmail.com) ***/
package com.qihoopp.qcoinpay;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.telephony.SmsMessage;
import com.qihoopp.framework.LogUtil;

public final class m extends BroadcastReceiver {
    private String b = "MyReceivedManagerPWP";

    public final void onReceive(Context paramContext, Intent paramIntent) {
        try {
            LogUtil.e("TAG", "MessageReceivedManager onReceive");
            if (paramIntent.getAction().equals("android.provider.Telephony.SMS_RECEIVED")) {
                if (((paramContext = (Object[]) paramIntent.getExtras().get("pdus")) != null)
                        && (paramContext.length > 0)) {
                    LogUtil.v(this.b, "pdus.length is : " + paramContext.length);
                    paramIntent = new SmsMessage[paramContext.length];
                    for (int i = 0; i < paramContext.length; ++i) {
                        byte[] arrayOfByte = (byte[]) paramContext[i];
                        paramIntent[i] = SmsMessage.createFromPdu(arrayOfByte);
                    }
                    Intent localIntent;
                    Context localContext = (localIntent = paramIntent).length;
                    for (paramContext = 0; paramContext < localContext; ++paramContext) {
                        paramIntent = localIntent[paramContext].getMessageBody();
                        LogUtil.e(this.b, "get message content is " + paramIntent);
                        if ((paramIntent = db.a(paramIntent, QcoinActivity.i(this.a))) == null)
                            continue;
                        QcoinActivity.d(this.a, paramIntent);
                    }
                }
                return;
            }
            LogUtil.e(this.b, "not our message.");
            return;
        } catch (java.lang.Exception paramContext) {
            LogUtil.e(this.b, "Exception", paramContext);
            return;
        } catch (OutOfMemoryError localOutOfMemoryError) {
            LogUtil.e(this.b, "catch OutOfMemoryError");
        }
    }
}